#include <ctime>
#include "ThreadPool.hpp"
#include "Task.hpp"
using namespace std;
int main()
{
	cout<<"process running..."<<endl;
	sleep(3);
	ThreadPool<Task>::GetInstance()->Start();
	srand(time(nullptr)^getpid());
	while(true)
	{
		int x=rand()%10+1;
		usleep(10);
		int y=rand()%5;
		char op=opers[rand()%opers.size()];	
	Task t(x,y,op);
	ThreadPool<Task>::GetInstance()->Push(t);
	cout<<"main Thread make task"<<t.GetTask()<<endl;
	sleep(1);
	}

	return 0;
}
